package generics.enumtype;

public enum  Plant {
    SUN(5.95e+24, 6.17e6),
    EARTH(5.95e+24, 6.17e6),
    MOON(5.95e+24, 6.17e6),
    MARS(5.95e+24, 6.17e6);

    private final double mass;
    private final double radius;
    private final double surfaceGravity;

    private static final  double G = 6.673e-11;

    Plant(double mass, double radius){
        this.mass = mass;
        this.radius = radius;
        surfaceGravity = G * mass / (mass * radius);
    }
}
